USE [RD_APMart]
GO
ALTER TABLE [dbo].[AP_Star_Facts] ADD  CONSTRAINT [PK_AP_Star_Facts] PRIMARY KEY CLUSTERED 
(
	[DocumentCompany] ASC,
	[DocumentNumber] ASC,
	[DocumentTypeCode] ASC,
	[PayItem] ASC,
	[PayItemExtensionNumber] ASC,
	[AdjustingDocumentType] ASC,
	[InternalPaymentID] ASC,
	[FileLineIdentifier] ASC,
	[AddressNumber] ASC,
	[TransactionTypeID] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_BusinessUnitID]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_BusinessUnitID] ON [dbo].[AP_Star_Facts] 
(
	[BusinessUnitID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CompanyID]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CompanyID] ON [dbo].[AP_Star_Facts] 
(
	[CompanyNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_CompanyNumberID]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_CompanyNumberID] ON [dbo].[AP_Star_Facts] 
(
	[CompanyNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_DiscountDueDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_DiscountDueDate] ON [dbo].[AP_Star_Facts] 
(
	[DiscountDueDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_DocumentType]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_DocumentType] ON [dbo].[AP_Star_Facts] 
(
	[DocumentTypeCode] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_DueDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_DueDate] ON [dbo].[AP_Star_Facts] 
(
	[DueDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_GLDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_GLDate] ON [dbo].[AP_Star_Facts] 
(
	[GLDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_HBatchDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_HBatchDate] ON [dbo].[AP_Star_Facts] 
(
	[HBatchDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_HCheckItemDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_HCheckItemDate] ON [dbo].[AP_Star_Facts] 
(
	[HCheckItemDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_HClearedValueDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_HClearedValueDate] ON [dbo].[AP_Star_Facts] 
(
	[HClearedValueDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_HGLVoidDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_HGLVoidDate] ON [dbo].[AP_Star_Facts] 
(
	[HGLVoidDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_InternalPaymentID]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_InternalPaymentID] ON [dbo].[AP_Star_Facts] 
(
	[InternalPaymentID] ASC,
	[TransactionTypeID] ASC,
	[SourceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_InvoiceDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_InvoiceDate] ON [dbo].[AP_Star_Facts] 
(
	[InvoiceDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_MetricType]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_MetricType] ON [dbo].[AP_Star_Facts] 
(
	[TransactionTypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_PaymentTermsID]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_PaymentTermsID] ON [dbo].[AP_Star_Facts] 
(
	[PaymentTermsID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_ServiceDateTax]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_ServiceDateTax] ON [dbo].[AP_Star_Facts] 
(
	[ServiceDateTaxID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_SupplierNumberID]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_SupplierNumberID] ON [dbo].[AP_Star_Facts] 
(
	[SupplierNumberID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_TypeID]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_TypeID] ON [dbo].[AP_Star_Facts] 
(
	[TypeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [IX_Facts_UserReservedDate]    Script Date: 09/08/2011 09:35:22 ******/
CREATE NONCLUSTERED INDEX [IX_Facts_UserReservedDate] ON [dbo].[AP_Star_Facts] 
(
	[UserReservedDateID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

/****** Object:  Index [PK_AP_Star_Facts]    Script Date: 09/08/2011 09:35:22 ******/


